package com.kyle.action;

import java.io.IOException;
import java.util.Date;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kyle.dao.MenuDao;
import com.kyle.dao.UserDao;
import com.kyle.entity.Menu;
import com.kyle.entity.util.JsonResult;
@Controller
@SuppressWarnings({"rawtypes","unchecked"})
@RequestMapping("/menu")
public class MenuAction {

	@Autowired
	@Qualifier(value="menuDao")
	private MenuDao menuDao;
	
	@RequestMapping(value="/getMenuByUser.xhtml")
	@ResponseBody
	public Object getMenuByUser(HttpServletRequest request,HttpServletResponse response){
		List<Menu> menuList = menuDao.getAllEntry();
		return menuList;
	}
}
